<?php
session_start();
ob_start();
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="public/CSS/works.css" type="text/css"/>
        <title></title>
    </head>
    <body>
        <?php function View() { ?> 
        <?php
        require_once 'model/works.php';
        $worker = new Works();
        $work = $worker->select_edit(NULL, $_GET['id_works']);
        ?>
        
        <form  method="post" enctype="multipart/form-data">
            <table border="2px">
                <tr>
                    <td>Tên Công Việc </td>
                    <td><?php echo $work["name"] ?></td>
                </tr>
                <tr>
                    <td>Ngày Đăng </td>
                    <td><?php $mydate = getdate($work['posted']); ?> 
                        <?php echo "$mydate[mday] $mydate[month], $mydate[year]"; ?></td>
                </tr>
                <tr>
                    <td>Làm Việc</td>
                    <td><?php echo $work["location"] ?></td>
                </tr>
                <tr>
                    <td>Công Ty</td>
                    <td><?php echo $work["company_name"] ?></td>
                </tr>
                <tr>
                    <td>Địa Chỉ</td>
                    <td><?php echo $work["company_address"] ?></td>
                </tr>
                <tr>
                    <td>Mô Tả Công Việc</td>
                    <td><?php echo $work["description"] ?></td>
                </tr>
                <tr>
                    <td>Điều Kiện</td>
                    <td><?php echo $work["experience_requirements"] ?></td>
                </tr>
                <tr>
                    <td>Liên Hệ</td>
                    <td><?php echo $work["company_profile"] ?></td>
                </tr>
                <tr>
                    <td>Hình Ảnh</td>
                    <td><img src="<?php echo $work['image'] ?>" width="100px" height="100px"></td>
                </tr>
            </table>
        </form>
        <?php } ?>
        
        <?php ob_end_flush(); ?>
    </body>
</html>